账号管理API
获取账号信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object | Body | 是 | 命令参数 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| account_id | String | Body | 账号ID |
| account_name | String | Body | 账号名称 |
| first_name | String | Body | 名 |
| last_name | String | Body | 姓 |
| String | Body | 邮箱 | |
| phone | String | Body | 电话 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_account_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"account_id": "a8b5a73f8dd84abaa94dcs248be49b0db",
"account_name": "demo@akubela.com",
"first_name": "tom",
"last_name": "fly",
"email": "demo@akubela.com",
"phone": "1234567"
}
}
失败返回示例
见 接口失败返回
更新账号信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| first_name | String | Body | 是 | 名 |
| last_name | String | Body | 是 | 姓 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_account_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"first_name": "dom",
"last_name": "lili"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
更新账号密码
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| new_password | String | Body | 是 | 新密码 |
| origin_password | String | Body | 是 | 原始密码 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_account_password",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"new_password": "123456Aa",
"origin_password": "12345655Bv"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
注销账号信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object | Body | 是 | 命令参数 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_account_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回